﻿@model VoiceModel.Record
           
@{
    Layout = "~/tmp/Views/_Layout.cshtml";
}

<var name="vm_id" expr="'@Model.id'" />
<var name="vm_event" expr="'continue'" />

<form id="@Model.id">
    <record name="CallersMessage" beep="true" maxtime="@Model.maxtimeStr" finalsilence="2500ms" type="audio/wav">
        @{Html.RenderPartial("Prompt", Model.prompts);}
    </record>
    @if (Model.confirm)
    { 
    <field name="confirmMessage" type="boolean">
       @{Html.RenderPartial("Prompt", Model.confirmationPrompts);}
      <filled>
        <if cond="confirmMessage">
          <submit expr="'@Model.recordingUrl?vm_id=' + vm_id + '&amp;vm_event=' + vm_event"  method="post" namelist="CallersMessage" enctype="multipart/form-data"/>
        <else/>
          <goto next="#@Model.id"/>
        </if>
      </filled>
    </field>
    }
    else
    { 
      <filled>
        <submit expr="'@Model.recordingUrl?vm_id=' + vm_id + '&amp;vm_event=' + vm_event"  method="post" namelist="CallersMessage" enctype="multipart/form-data"/>
      </filled>
        
    }
    
</form>
